<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>

    <th:block th:fragment="links">
        <meta content="text/html;charset=UTF-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <meta name="_csrf" th:content="${_csrf.token}"/>
        <meta name="_csrf_header" th:content="${_csrf.headerName}"/>
        <link th:href="@{/plugins/bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
        <link th:href="@{/plugins/bootstrap/css/themes.min.css}" rel="stylesheet"/>
        <link th:href="@{/plugins/font-awesome/css/font-awesome.min.css}" rel="stylesheet"/>
        <link th:href="@{/plugins/bootstrap-select/css/bootstrap-select.min.css}" rel="stylesheet"/>
        <link th:href="@{/plugins/messager/css/messenger.css}" rel="stylesheet"/>
        <link th:href="@{/plugins/messager/css/messenger-theme-block.css}" rel="stylesheet"/>
        <link th:href="@{/plugins/jquery-confirm/jquery-confirm.min.css}" rel="stylesheet"/>
        <link th:href="@{/plugins/waves-0.7.5/waves.min.css}" rel="stylesheet"/>
        <link th:href="@{/css/common.css}" rel="stylesheet"/>

    </th:block>
</head>
<body>
<th:block th:fragment="impJS">
    <script th:src="@{/plugins/jquery.1.12.4.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/bootstrap/js/bootstrap.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/bootstrap-select/js/bootstrap-select.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/bootstrap-select/js/i18n/defaults-zh_CN.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/jquery.form.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/waves-0.7.5/waves.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/messager/js/messenger.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/jquery-confirm/jquery-confirm.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/jquery-validation/jquery.validate.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/jquery-validation/localization/messages_zh.min.js}" type="text/javascript"></script>
    <script th:src="@{/plugins/vue.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/common.js}" type="text/javascript"></script>
</th:block>

<th:block th:fragment="navigation">
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">DOC-MANAGER</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="/index.html"><i class="fa fa-home"></i> 主页 </a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users"></i> 团队 <span
                                class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/group/index.html">全部</a></li>
                            <li role="separator" class="divider"></li>
                            <li v-for="group in groups"><a v-bind:href="'/group/'+group.groupId+'.html'">{{group.groupName}}</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-sitemap"></i> 项目 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/project/index.html">全部</a></li>
                            <li role="separator" class="divider"></li>
                            <li v-for="app in projects"><a v-bind:href="'/project/'+app.appId+'.html'">{{app.appName}}</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav pull-right">
                    <th:block th:if="${session.isLogin}">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users"></i> <span
                                    th:text="${session.userInfo.nickName}"></span> <span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="/profile/index.html">个人信息</a></li>
                                <li><a href="/profile/setting.html">项目设置</a></li>
                                <li><a href="/profile/updatePwd.html">修改密码</a></li>
                                <li><a href="/logout">退出登录</a></li>
                            </ul>
                        </li>
                    </th:block>
                    <th:block th:unless="${session.isLogin}">
                        <li><a href="#" th:text="${isLogin}"><i class="fa fa-sign-in"></i> 登录 </a></li>
                        <li><a href="#"><i class="fa fa-info-circle"></i> 注册 </a></li>
                    </th:block>
                </ul>
            </div><!--/.nav-collapse -->
        </div>
    </nav>
</th:block>
</body>
</html>